from xpinyin import Pinyin

pin = Pinyin()
test1 = pin.get_pinyin("大河向东流")  # 默认分割符为-
print(test1)

test2 = pin.get_pinyin("大河向东流", "")
print(test2[0].upper())

ss = ") VALUES (0,'{0}',0,0,'{1}','','{2}',1,'{3}','',''," \
     "''," \
     "'{4}','{5}','','','','','','','','',0,'','','','','','','','','','','','',0,0,0,0,0,0,0,0,0,0,0,''," \
     "'','',{6},{7},0,0,0,0.0,'','','','','','','','','','|','dplayer','','',{8},'','','','')"
ll = list(ss)

# 2.用一个列表记录总共多少种字符
new_ll = []

for i in ss:
    if i not in new_ll:
        new_ll.append(i)

# 3.用一个字典记录结果 ,  遍历列表 , 求count()
d = {}

for i in new_ll:
    d[i] = ll.count(i)

print(d)
